package com.coder.bike.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author 沈诩宸
 * @since 2025-04-22
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("busi_customer")
@ApiModel(value = "Customer对象", description = "")
public class Customer implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("客户id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户昵称")
    private String nickname;

    @ApiModelProperty("客户真实姓名")
    private String name;

    @ApiModelProperty("手机号码")
    private String tel;

    @ApiModelProperty("出生日期")
    private LocalDate birthday;

    @ApiModelProperty("身份证号码")
    private String idNum;

    @ApiModelProperty("账户余额")
    private Integer balance;

    @ApiModelProperty("客户状态 0 黑名单 1白名单")
    private Boolean status;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("最后骑行时间")
    private LocalDateTime lastRide;

    @ApiModelProperty("实名认证状态（0未认证 1已认证)")
    private Boolean isVerified;

    @ApiModelProperty("常骑单车类型")
    private String preferredType;

    @ApiModelProperty("常骑车辆品牌")
    private String preferredBrand;

    @ApiModelProperty("信誉积分")
    private Integer creditScore;

    @ApiModelProperty("是否删除")
    private Boolean deleted;

    @ApiModelProperty("用户账户")
    private String username;

    @ApiModelProperty("用户密码")
    private String password;

    @ApiModelProperty("用户头像")
    private String avatar;

    @ApiModelProperty("用户邮箱")
    private String email;

    @ApiModelProperty("账户是否过期")
    private boolean isAccountNonExpired = true;

    @ApiModelProperty("账户是否被锁定")
    private boolean isAccountNonLocked = true;

    @ApiModelProperty("密码是否过期")
    private boolean isCredentialsNonExpired = true;

    @ApiModelProperty("账户是否可用")
    private boolean isEnabled = true;

    @ApiModelProperty("权限列表/对应菜单列表")
    @TableField(exist = false)
    private List<Permission> permissionList;
}
